自定义:现在自定义程序的图像!

  1. 更改背景图像
  2. 然后,更改球的图像标签
  3. 最后,更改精灵的图像标签
  4. 完成后,单击提交接下来继续扩展您当前项目的活动。

To navigate the page using the TAB key, first press ESC to exit the code editor.

microbit = codesters.Microbit() microbit.show_string("hello") stage.set_background("soccerfield") sprite = codesters.Sprite("athlete2") sprite.move_down(150) def button_a(): sprite.move_left(50) microbit.event_button_a(button_a) def button_b(): sprite.move_right(50) microbit.event_button_b(button_b) ball = codesters.Sprite("soccerball") ball.set_x_speed(5) ball.set_y_speed(5) def collision(sprite, hit_sprite): hit_sprite.set_y_speed(5) sprite.event_collision(collision) stage.disable_floor()
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)